﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Data;

namespace QLKS.Converters
{
    public class LoaiPhongToColor : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            System.Windows.Media.Brush br = System.Windows.Media.Brushes.DarkViolet;
            switch ((int)value)
            {
                case 1: br = System.Windows.Media.Brushes.Cyan;
                    break;
                case 2: br = System.Windows.Media.Brushes.DarkGoldenrod;
                    break;
                case 3: br = System.Windows.Media.Brushes.Orchid;
                    break;
            }
            return br;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class TinhTrangToColor : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            System.Windows.Media.Brush br = System.Windows.Media.Brushes.Beige;
            switch ((int)value)
            {
                case 1: br = System.Windows.Media.Brushes.Green;
                    break;
                case 2: br = System.Windows.Media.Brushes.Blue;
                    break;
                case 3: br = System.Windows.Media.Brushes.Red;
                    break;
            }
            return br;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
